package com.zcfeng.ischool;

import android.content.Intent;
import android.os.Message;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import org.json.JSONException;
import org.json.JSONObject;

import io.rong.imkit.RongIM;
import io.rong.imkit.fragment.ConversationFragment;
import io.rong.imkit.fragment.ConversationListFragment;
import io.rong.imlib.model.Conversation;
import utils.MyConstaints;
import utils.SPUtils;
import utils.ToastUtils;

public class ConversationActivity extends FragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_conversation);
        Intent intent=getIntent();

        ConversationFragment cf=(ConversationFragment)getSupportFragmentManager().findFragmentById(R.id.conversation);
        String ss=intent.getData().getQueryParameter("title");
        if (cf.getConversationType()!=Conversation.ConversationType.CHATROOM)
        {
            LinearLayout ll= (LinearLayout) findViewById(R.id.convtable);

            LinearLayout l= (LinearLayout) findViewById(R.id.conversationlayout);
            l.removeView(ll);
        }
        else
        ((TextView)findViewById(R.id.table)).setText(ss);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
